package TestSystemUtil;

import java.sql.Connection;
import java.sql.DriverManager;

public class DBconnect {

	public static Connection establishConnection() {
		Connection connect = null;
		String url = "jdbc:postgresql://localhost:5432/MultipleChoiceTest";
		try {
			Class.forName("org.postgresql.Driver");
			connect = DriverManager.getConnection(url, "postgres", "admin");
			System.out.println("Connected to Postsql from Server sucessful !!! Excuting Query");
			return connect;
		} catch (Exception ex) {
			System.err.println(ex);
			return connect;
		}
	}
}
